import request from "../utils/axios";

export const addARoom = (data:any) => {
    return request.post('/api/room/addARoom', data)
}

export const getAllRoomByCinema = (data:any) => {
    return request.get(`/api/room/getAllRoomByCinema/${data.cinemaId}`)
}

export const getRoomBySchedule = (data:any) => {
    return request.get(`/api/room/getRoomBySchedule/${data.movieId}/${data.date}/${data.cinemaId}/${data.scheduleId}`)
}

export const updateARoom = (data:any) => {
    return request.post('/api/room/updateARoom', data)
}

export const deleteARoom = (data:any) => {
    return request.get(`/api/room/deleteARoom/${data.roomId}`)
}

export const getAvailableRoomsByCinema = (data:any) => {
    return request.get(`/api/room/getAvailableRoomsByCinema/${data.cinemaId}`)
}

export const updateRoomOpenStatusById = (data:any) => { 
    return request.get(`/api/room/updateRoomOpenStatusById/${data.roomId}`)
}